package com.alks.function.controller.task;

import com.alks.function.service.PcProdStatus2Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ProductionTask {

    @Autowired
    private PcProdStatus2Service PcProdStatus2Service;


    @Scheduled(cron = "0 0 * * * ?")
    void GenerateProductionDynamics(){
        PcProdStatus2Service.GenerateProductionDynamics("BF","SYSTEM");
        log.info("生成生产动态表-定时任务执行成功");
    }

    @Scheduled(cron = "0 30 * * * ?")
    void GenerateProductionDynamics2(){
        PcProdStatus2Service.GenerateProductionDynamics("HF","SYSTEM");
        log.info("生成生产动态表-定时任务执行成功");
    }
}
